package com.crr.mall.product.dao;

import com.crr.mall.product.entity.AttrAttrgroupRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crr.mall.product.vo.AttrGroupRelationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性&属性分组关联
 * 
 * @author chenrenren
 * @email chenrenren@gmail.com
 * @date 2024-11-22 14:50:19
 */
@Mapper
public interface AttrAttrgroupRelationDao extends BaseMapper<AttrAttrgroupRelationEntity> {
    int updateByAttrId(@Param("attrId") Long attrId,@Param("attrGroupId") Long attrGroupId);
    /**
     * 根据attrID和attrGroupID 删除数据
     * @param attrGroupVOS
     * @return
     */
    int  deleteByids(@Param("attrGroupVOS") List<AttrAttrgroupRelationEntity> attrGroupVOS);
    /**
     * 保存attr和attrGroup分组关联
     * @param attrGroupVOS
     * @return
     */
    int  saveGroupinfo(@Param("attrGroupVOS") List<AttrGroupRelationVO> attrGroupVOS);

}
